﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Template_Admin.Master" AutoEventWireup="true" CodeBehind="QuanLy_ChiTiet_SanPham.aspx.cs" Inherits="Cua_Hang.Admin.QuanLy_ChiTiet_SanPham" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 335px;
            height: 16px;
        }
        .style4
        {
            height: 16px;
        }
        .style6
        {
        }
        .style7
        {
            width: 335px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style1">
        <tr>
            <td colspan="2">
                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Italic="True" 
                    Font-Size="Larger" Text="Quản Lý Chi Tiết Sản Phẩm" ForeColor="#00CC66"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style7">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style7">
                <asp:Label ID="Label3" runat="server" Text="Loại Sản Phẩm"></asp:Label>&nbsp;&nbsp;
                <asp:DropDownList ID="DDL_TenSanPham" runat="server" Height="20px" 
                    Width="177px" 
                   DataTextField="Ten_ChiTiet_CuaHang" 
                    DataValueField="ID_ChiTiet_CuaHang">
                    
                </asp:DropDownList>
            </td>
            <td align="left">
                <asp:Label ID="Label2" runat="server" Text="Tên Sản Phẩm"></asp:Label> &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
                <asp:TextBox ID="TB_TenChiTietSanPham" runat="server" Width="211px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="left" class="style7">
                &nbsp;</td>
            <td>
                <asp:TextBox ID="Id_chitietsp" runat="server" Enabled="False" Visible="false" Width="47px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="left" class="style7">
                <asp:Label ID="Label4" runat="server" Text="Ảnh Sản Phẩm"></asp:Label>&nbsp;
                <asp:FileUpload ID="uplImage" runat="server" Width="100px" />
            </td>
            <td align="left">
                <asp:Label ID="Label5" runat="server" Text="Giá Sản Phẩm(VNĐ)"></asp:Label>&nbsp;&nbsp;&nbsp;
                <asp:TextBox ID="TB_GiaSanPham" runat="server" Width="207px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style7" align="left">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="center" class="style7">
                <asp:Label ID="Label6" runat="server" Text="Thông Tin Chi Tiết Sản Phẩm"></asp:Label>
            </td>
            <td align="center">
                <asp:Label ID="Label7" runat="server" Text="Ghi Chú Chi Tiết Sản Phẩm"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style7" align="left">
                
                <asp:TextBox ID="TBThongTinChiTietSP" runat="server" Height="123px" 
                    Width="297px" TextMode="MultiLine"></asp:TextBox>
            </td>
            <td align="center">
                
                <asp:TextBox ID="TBGhiChuChiTietSP" runat="server" Height="123px" 
                    Width="297px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="left" class="style7">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style7" align="left">
                &nbsp;</td>
            <td align="left">
                <asp:Button ID="Bt_Them" runat="server" Text="Thêm " onclick="Bt_Them_Click" /> &nbsp; &nbsp; 
                <asp:Button ID="Bt_CapNhat" runat="server" Text="Cập Nhật" 
                    onclick="Bt_CapNhat_Click" />
            </td>
        </tr>
        <tr>
            <td align="left" class="style3">
            </td>
            <td class="style4">
                </td>
        </tr>
        <tr>
            <td align="center" class="style6" colspan="2">
                <asp:GridView ID="GV_ChiTietSanPham" runat="server" AutoGenerateColumns="False" DataKeyNames="ID_ChiTiet_SanPham" 
                    onrowcommand="GV_ChiTietSanPham_RowCommand" 
                    onpageindexchanging="GV_ChiTietSanPham_PageIndexChanging" 
                    onselectedindexchanging="GV_ChiTietSanPham_SelectedIndexChanging" 
                    onselectedindexchanged="GV_ChiTietSanPham_SelectedIndexChanged" 
                    AllowPaging="True" BackColor="White" BorderColor="#CC9966" BorderStyle="None" 
                    BorderWidth="1px" CellPadding="4" PageSize="4">
                <Columns>
         
                        <asp:BoundField DataField="ID_ChiTiet_SanPham" HeaderText="Mã Sản Phẩm" SortExpression="ID_ChiTiet_SanPham" />
                         <asp:BoundField DataField="Ten_ChiTiet_CuaHang" HeaderText="Loại Sản Phầm" SortExpression="Ten_ChiTiet_CuaHang" />
                        <asp:BoundField DataField="Ten_ChiTiet_SanPham" HeaderText="Tên Sản Phầm" SortExpression="Ten_ChiTiet_SanPham" />
                     
                        <asp:BoundField DataField="Anh_ChiTiet_SanPham" HeaderText="Ảnh Sản Phẩm" SortExpression="Anh_ChiTiet_SanPham" />
                        <asp:BoundField DataField="Gia_ChiTiet_SanPham" HeaderText="Giá Sản Phẩm" SortExpression="Gia_ChiTiet_SanPham" />
                        <asp:BoundField DataField="ThongTin_ChiTiet_SanPham" HeaderText="Thông Tin Chi Tiết Sản Phẩm" SortExpression="ThongTin_ChiTiet_SanPham" />
                        <asp:BoundField DataField="GhiChu_ChiTiet_SanPham" HeaderText="Ghi Chú Sản Phẩm" SortExpression="GhiChu_ChiTiet_SanPham" />
                         <asp:CommandField SelectText="Sửa" HeaderText="Sửa " ShowSelectButton="True" />

                         <asp:TemplateField HeaderText="Xoá">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" OnClientClick="return confirm('Ban co muon xoa ko?')" runat="server" CommandName="Xoa" CommandArgument='<%# Eval("ID_ChiTiet_SanPham")%>'>Xoá</asp:LinkButton>
                        </ItemTemplate>
                        </asp:TemplateField>
                        
                 </Columns>
                    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                    <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                    <RowStyle BackColor="White" ForeColor="#330099" />
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                    <SortedAscendingCellStyle BackColor="#FEFCEB" />
                    <SortedAscendingHeaderStyle BackColor="#AF0101" />
                    <SortedDescendingCellStyle BackColor="#F6F0C0" />
                    <SortedDescendingHeaderStyle BackColor="#7E0000" />
                </asp:GridView>
                &nbsp; &nbsp; &nbsp;
                </td>
        </tr>
        </table>
</asp:Content>
